import logging

# logging.basicConfig(level=logging.DEBUG)
# level设置等级 filename日志文件保存路径 format输出格式
logging.basicConfig(level=logging.NOTSET,filename="初识NLTK.py.log",format="%(asctime)s-%(filename)s [line:%(lineno)d]:%(message)s")  # 设置日志等级
logging.debug("调试信息")
logging.info("普通信息")
logging.warning("警告信息")
logging.error("错误信息")
logging.critical("异常信息")
# DEBUG > INFO	> WARNING > ERROR > CRITICAL